﻿using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Internal.KuiHuaBaoDian.Services.Lockstep;

namespace KuiHuaBaoDian.Services.Lockstep {

    public abstract class KHBD_LockstepCommand : ILockstepCommand {

        public LockstepClientID ClientID { get; init; }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        void ILockstepCommand.Execute() => Execute();

        protected abstract void Execute();
    }

    public interface ILockstepCommand {

        public interface IClientJoin : ILockstepCommand, ILockstepCommandInternal {
        }

        public interface IClientInitialize : ILockstepCommand, ILockstepCommandInternal {
        }

        public interface IClientPrepared : ILockstepCommand, ILockstepCommandInternal {

            List<LockstepClientID> ClientIDList { get; set; }

            ulong RandomSeed { get; set; }
        }

        public interface ISetTimeScale : ILockstepCommand, ILockstepCommandInternal {

            float Value { get; set; }
        }

        public interface IPause : ILockstepCommand, ILockstepCommandInternal {
        }

        public interface IResume : ILockstepCommand, ILockstepCommandInternal {
        }

        public interface IEnd : ILockstepCommand, ILockstepCommandInternal {
        }

        LockstepClientID ClientID { get; init; }

        void Execute();
    }
}

namespace Internal.KuiHuaBaoDian.Services.Lockstep {

    public interface ILockstepCommandInternal {
    }
}